<template>
  <div>
    <div class="heads">
      <div class="fh" @click="$router.go(-1)">
        <span class="iconfont icon-arrow-left-bold"></span> 返回
      </div>
      <div class="center" style="font-size: 19px">充值中心</div>
      <router-link class="shuJ" tag="div" to="/Home"><span class="iconfont icon-shujia"></span> 主页</router-link>
    </div>
    <div class="pd-w balance">当前余额：<i class="red">0 </i>纵横币</div>
    <section class="pd-w recharge">
      <div class="r-card">
        <div class="f-14">选择充值方式：</div>
        <van-grid :column-num="2" class="grid" :gutter="10">
          <van-grid-item
            icon="https://img2.baidu.com/it/u=3368295025,3719612550&fm=26&fmt=auto"
            text="支付宝"
            :class="paly=='zfb'?'com':''"
            @click="paly='zfb'"
          />
          <van-grid-item
            icon="https://img1.baidu.com/it/u=1601897374,2595395114&fm=26&fmt=auto"
            text="微信"
             :class="paly=='wx'?'com':''"
             @click="paly='wx'"
          />
        </van-grid>
      </div>
      <div class="mb10"></div>
      <div class="r-card">
        <div class="f-14">选择充值金额：</div>
        <van-grid :column-num="3" :gutter="10" class="grid">
          <van-grid-item text="500纵横币" :class="palyNum=='1'?'com':''"  @click="palyNum='1'">
            <template #icon>5元</template>
          </van-grid-item>
          <van-grid-item text="1000纵横币" :class="palyNum=='2'?'com':''"  @click="palyNum='2'">
            <template #icon>10元</template>
          </van-grid-item>
          <van-grid-item text="3000纵横币" :class="palyNum=='3'?'com':''"  @click="palyNum='3'">
            <template #icon>30元</template>
          </van-grid-item>
          <van-grid-item text="5000纵横币" :class="palyNum=='4'?'com':''"  @click="palyNum='4'">
            <template #icon>50元</template>
          </van-grid-item>
          <van-grid-item text="10000纵横币" :class="palyNum=='5'?'com':''"  @click="palyNum='5'">
            <template #icon>100元</template>
          </van-grid-item>

          <van-grid-item text="100000纵横币" :class="palyNum=='6'?'com':''"  @click="palyNum='6'">
            <template #icon>1000元</template>
          </van-grid-item>
        </van-grid>
      </div>
      <div class="button-pay-wap" id="Jpaybtn" data-flag="1">确定</div>
    </section>
    <footer>
      <nav class="channel">
        <span>男生</span>
        <span>女生</span>
        <span>出版</span>
        <span>客服</span>
        <span>微信</span>
      </nav>
      <nav>
        <span>客户端</span>
        <span>帮助</span>
        <span clspanss="cur">触屏版</span>
        <span>电脑版</span>
      </nav>
      <div class="m-right"><p>网易公司版权所有©1997-2021</p></div>
    </footer>
  </div>
</template>

<script>
export default {
    data(){
        return{
            paly:'zfb',
            palyNum:'1'
        }
    }
};
</script>

<style lang="less">
.heads {
  width: 100%;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  color: #fff;
  background-color: #333;
  height: 44px;
  line-height: 44px;
  .fh {
    padding-left: 10px;
  }
  .shuJ {
    padding-right: 10px;
  }
}
.balance {
  border-bottom: 1px solid #d8d8d8;
  background: #f8f8f8;
  color: #50576a;
  padding: 0.625rem;
  .red {
    color: #ff4644;
  }
}
.recharge {
  padding: 15px;
  margin-bottom: 20px;
  background: #fff;
  .r-card {
    .f-14 {
    }
  }
  .grid {
    margin: 15px 0;
    .van-grid-item__icon-wrapper,.van-icon{
        position: unset;

    }
    .com {
      .van-grid-item__content {
        border: 1px solid #e95e56;
        position: relative;
        color: #e95e56;
        background: none;
        & ::after{
          content: "";
          position: absolute;
          right: 0;
          bottom: 0;
          background: url(http://static.zongheng.com/h5/v2/images/select.png) no-repeat;
          width: 1rem;
          height: 1rem;
          background-size: 1rem;
        }
      }
    }
    .van-grid-item__content {
      background: #fafafa;
      border-radius: 0.35rem;
      overflow: hidden;
    }
  }
  .button-pay-wap {
    height: 2.75rem;
    background: #e95e56;
    font-size: 0.75rem;
    line-height: 2.75rem;
    color: #fff;
    text-align: center;
    border-radius: 3px;
  }
}
footer {
  text-align: center;
  color: #999;
  font-size: 12px;
  line-height: 25px;
  padding-top: 10px;
  span {
    margin: 0 15px;
  }
}
</style>